namespace ApplicationControllerExample.Infrastructure.IoC
{
    using System.Windows.Forms;
    using StructureMap;

    public class BootStrapper
    {
        public BootStrapper(IContainer container)
        {
            Container = container;
        }

        private IContainer Container { get; set; }

        public ApplicationContext GetAppContext()
        {
            Container.Configure(c => c.AddRegistry<DefaultRegistry>());
            return Container.GetInstance<ApplicationContext>();
        }
    }
}